#! /usr/bin/env python

# The Python doesn't have constants.
# This hack provides constants.
# Compatible with Python 2 and 3.

class Const:
	class ConstError(TypeError): pass
	def __setattr__(self, name, value):
		if name in self.__dict__:
			raise self.ConstError("Can't rebind const(%s)" % name)
		self.__dict__[name] = value
